using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WqLunTan.Models.DataBase
{
    /// <summary>
    /// 举报帖子
    /// </summary>
    [Table("post_inform")]
    public class post_inform
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public Guid id { get; set; }

        /// <summary>
        /// 帖子的id, 外键
        /// </summary>
        public Guid tid { get; set; }

        /// <summary>
        /// 帖子楼层的id
        /// </summary>
        public Guid cid { get; set; }

        /// <summary>
        /// 举报理由
        /// </summary>
        [MaxLength(500)]
        public string reason { get; set; }

        /// <summary>
        /// ip地址
        /// </summary>
        [MaxLength(50)]
        [Required(AllowEmptyStrings = true)]
        public string ip { get; set; } = string.Empty;

        /// <summary>
        /// 举报的状态
        /// </summary>
        public PostInformState state { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTimeOffset addtime { get; set; }
    }

    /// <summary>
    /// 帖子举报的状态
    /// </summary>
    public enum PostInformState
    {
        /// <summary>
        /// 未处理
        /// </summary>
        Init = 1,

        /// <summary>
        /// 确认
        /// </summary>
        Verify = 2,

        /// <summary>
        /// 无效
        /// </summary>
        Dispose = 3
    }
}